﻿@using Nop.Web.Framework.UI;
@{
    //success messages
    var successMessages = new List<string>();
    if (TempData[string.Format("nop.notifications.{0}", NotifyType.Success)] != null)
    {
        successMessages.AddRange(TempData[string.Format("nop.notifications.{0}", NotifyType.Success)] as IList<string>);
    }
    if (ViewData[string.Format("nop.notifications.{0}", NotifyType.Success)] != null)
    {
        successMessages.AddRange(ViewData[string.Format("nop.notifications.{0}", NotifyType.Success)] as IList<string>);
    }


    //error messages
    var errorMessages = new List<string>();
    if (TempData[string.Format("nop.notifications.{0}", NotifyType.Error)] != null)
    {
        errorMessages.AddRange(TempData[string.Format("nop.notifications.{0}", NotifyType.Error)] as IList<string>);
    }
    if (ViewData[string.Format("nop.notifications.{0}", NotifyType.Error)] != null)
    {
        errorMessages.AddRange(ViewData[string.Format("nop.notifications.{0}", NotifyType.Error)] as IList<string>);
    }
}
@foreach (var message in successMessages)
{
    <div class="messageBox messageBoxSuccess">
        @message
    </div>
}
@foreach (var message in errorMessages)
{
    <div class="messageBox messageBoxError">
        @message
    </div>
}